package com.diana.mapper;

import com.baomidou.mybatisplus.plugins.Page;
import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.diana.entity.ManagerMain;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author anzhi
 * @since 2019-04-21
 */
public interface ManagerMainMapper extends BaseMapper<ManagerMain> {

    @Select("SELECT a.*,b.roleName FROM manager_main a left join manager_role b on a.roleId = b.roleId where 1=1 ${joinsql} and a.status!=2 order by a.updateTime")
    List<Map<String,Object>> getManagerList(@Param("joinsql") String joinsql, Page<Map<String, Object>> page);

}
